package com.calculator.enums;

public enum OperatorEnum {
	ADD("+", ""), SUBSTRACT("-", ""), MULTIPLY("*", ""), DIVIDE("/", "");

	private String symbolic;
	private String word;

	public static OperatorEnum findByString(String value) {
		for (OperatorEnum o : OperatorEnum.values()) {
			if (o.getSymbolic().equals(value) || o.getWord().equals(value)) {
				return o;
			}
		}
		return null;
	}

	private OperatorEnum(String symbolic, String word) {
		this.symbolic = symbolic;
		this.word = word;
	}

	public String getSymbolic() {
		return symbolic;
	}

	public void setSymbolic(String symbolic) {
		this.symbolic = symbolic;
	}

	public String getWord() {
		return word;
	}

	public void setWord(String word) {
		this.word = word;
	}

}
